#include<reg52.h>
#define uchar unsigned char
sbit dula=P2^6;
sbit wela=P2^7;
unsigned char j,k;
void delay(uchar x)
{
uchar j;
while(x--)
{
for(j=0;j<125;j++);
}
}
uchar code table[]={0x06,0x5b};
void main()
{
uchar i=0;
while(1)
{
switch(i)
{
	case 0:
	P0=table[i];
	dula=1;
	dula=0;
	P0=0x7e;
	wela=1;
	wela=0;
	delay(2);
	break;
	case 1:
	P0=table[i];
	dula=1;
	dula=0;
	P0=0x7d;
	wela=1;
	wela=0;
	delay(2);
	break;
}
delay(1);
i++;
if(i>=2)
i=0;

}
}
